<template>
  <div>
    <el-form :inline="true" class="user-search">
      <el-time-picker is-range v-model="timeHorizon" range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间"
        placeholder="选择时间范围">
      </el-time-picker>
      <el-select v-model="value" placeholder="全日房">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
      <el-button size="small" type="primary" icon="el-icon-search" @click="list">查询</el-button>
      <el-button>批量设置房态</el-button>
    </el-form>
  
    <el-table :data="tableData" style="width: 100%" height="510" :header-cell-style="{textAlign: 'center'}" :cell-style="{ textAlign: 'center' }">
  
      <el-table-column label="房型" prop="classify">
      </el-table-column>
  
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="mini" @click="doLoad(scope.$index, scope.row)" title="修改" icon="el-icon-tickets">修改</el-button>
        </template>
      </el-table-column>
  
    </el-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        timeHorizon: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
        options: [{
          value: '选项1',
          label: '全日房'
        }, {
          value: '选项2',
          label: '钟点房'
        }],
        value: '',
        tableData: [],
      }
    },
    methods: {},
    created() {
      this.list()
    }
  }
</script>

<style>
  .user-search {
    margin-top: 20px;
  }
  
  .userRole {
    width: 100%;
  }
  
  .block {
    margin-top: 20px;
    text-align: right;
  }
  
  .disabled {
    font-size: 17px;
  }
</style>
